package com.amox.uitest.adapter;

import org.dom4j.Element;

import com.amox.uitest.tcase.BaseTestCase;

public class BackAdapter extends BaseAdapter<Boolean> {
	
	public BackAdapter(BaseTestCase uitest) {
		super(uitest);
	}
	
	@Override
	public Boolean adapter(Element element) throws Exception {
		int num = Integer.valueOf(element.getStringValue());
		for(int i = 0; i<num; i++) {
			uitest.getUiDevice().pressBack();
			uitest.sleep(1000);
		}
		return true;
	}
}
